package com.igeek.boot.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.igeek.boot.entity.WmsLog;
import com.igeek.boot.result.Result;
import com.igeek.boot.service.IWmsLogService;
import com.igeek.boot.vo.PageQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @package com.igeek.boot.controller
 * @Description 日志接口信息的查看
 * @Author LittlePunk [296526219@qq.ccom]
 * @Version 2022.1
 * @Date 2024/1/10 18:41
 */
@RequestMapping("/wisdom_factory/wms_log")
@Api(tags = "日志接口")
@RestController
public class WMSLogController {

    @Autowired
    private IWmsLogService wmsLogService;
    //分页查询所有的日志信息
    @ApiOperation("分页查询日志信息")
    @GetMapping("/findPage")
    public Result findPage(@ApiParam("查询条件") PageQueryVO queryVO){
        Page<WmsLog> page =  wmsLogService.findPage(queryVO);
        if(!ObjectUtils.isEmpty(page)){
            return new Result(true,"日志查询成功",page);
        }
        return new Result(false,"日志查询失败");
    }
}
